home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / U-Z / VideoToolbox 4.95.sit / VideoToolbox / VideoToolboxSources / NoiseFill.c < prev    next >
MacBinary  |  1994-11-22  |  8.4 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Nov 22 08:52:22 1994, modified Tue Nov 22 08:52:22 1994, creator 'MMCC', type ASCII, 7442 bytes "NoiseFill.c" , at 0x1d92 832 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 4e 6f 69 73 65 46 | 69 6c 6c 2e 63 00 00 00 |..NoiseF|ill.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 1d 12 00 | 00 03 40 aa f7 a8 16 aa |........|..@.....|
|00000060| f7 a8 16 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a8 83 00 00 |........|........|
|00000080| 2f 2a 20 4e 6f 69 73 65 | 46 69 6c 6c 2e 63 0d a9 |/* Noise|Fill.c..|
|00000090| 20 31 39 38 39 2d 31 39 | 39 34 20 44 65 6e 69 73 | 1989-19|94 Denis|
|000000a0| 20 47 2e 20 50 65 6c 6c | 69 2e 0d 09 65 72 72 6f | G. Pell|i...erro|
|000000b0| 72 3d 4e 6f 69 73 65 46 | 69 6c 6c 28 77 69 6e 64 |r=NoiseF|ill(wind|
|000000c0| 6f 77 2c 26 72 65 63 74 | 2c 64 78 2c 64 79 2c 72 |ow,&rect|,dx,dy,r|
|000000d0| 61 6e 64 6f 6d 50 68 61 | 73 65 29 3b 20 0d 46 69 |andomPha|se); .Fi|
|000000e0| 6c 6c 73 20 74 68 65 20 | 72 65 63 74 20 69 6e 20 |lls the |rect in |
|000000f0| 74 68 65 20 77 69 6e 64 | 6f 77 20 77 69 74 68 20 |the wind|ow with |
|00000100| 6e 6f 69 73 65 2e 20 54 | 68 65 20 6e 6f 69 73 65 |noise. T|he noise|
|00000110| 20 69 73 20 6d 61 64 65 | 20 75 70 20 6f 66 20 62 | is made| up of b|
|00000120| 6c 61 63 6b 20 26 20 77 | 68 69 74 65 0d 63 68 65 |lack & w|hite.che|
|00000130| 63 6b 73 2c 20 65 61 63 | 68 20 64 78 20 70 69 78 |cks, eac|h dx pix|
|00000140| 65 6c 73 20 77 69 64 65 | 20 62 79 20 64 79 20 70 |els wide| by dy p|
|00000150| 69 78 65 6c 73 20 68 69 | 67 68 2e 20 52 61 6e 64 |ixels hi|gh. Rand|
|00000160| 6f 6d 20 70 68 61 73 65 | 20 69 73 20 6f 70 74 69 |om phase| is opti|
|00000170| 6f 6e 61 6c 2e 20 28 64 | 78 20 61 6e 64 0d 64 79 |onal. (d|x and.dy|
|00000180| 20 61 72 65 20 64 6f 75 | 62 6c 65 73 2c 20 61 6e | are dou|bles, an|
|00000190| 64 20 6e 65 65 64 20 6e | 6f 74 20 62 65 20 69 6e |d need n|ot be in|
|000001a0| 74 65 67 72 61 6c 2e 20 | 54 68 65 20 6e 6f 69 73 |tegral. |The nois|
|000001b0| 65 20 69 73 20 73 79 6e | 74 68 65 73 69 7a 65 64 |e is syn|thesized|
|000001c0| 20 77 69 74 68 20 31 2d | 70 69 78 65 6c 0d 63 68 | with 1-|pixel.ch|
|000001d0| 65 63 6b 73 20 61 6e 64 | 20 65 78 70 61 6e 64 65 |ecks and| expande|
|000001e0| 64 20 62 79 20 43 6f 70 | 79 42 69 74 73 2c 20 77 |d by Cop|yBits, w|
|000001f0| 68 69 63 68 20 69 73 20 | 63 61 70 61 62 6c 65 20 |hich is |capable |
|00000200| 6f 66 20 65 78 70 61 6e | 73 69 6f 6e 20 62 79 20 |of expan|sion by |
|00000210| 6e 6f 6e 2d 69 6e 74 65 | 67 72 61 6c 0d 61 6d 6f |non-inte|gral.amo|
|00000220| 75 6e 74 73 2e 29 0d 0d | 09 65 72 72 6f 72 3d 4e |unts.)..|.error=N|
|00000230| 6f 69 73 65 46 69 6c 6c | 42 69 74 73 28 70 69 78 |oiseFill|Bits(pix|
|00000240| 6d 61 70 50 74 72 2c 26 | 72 65 63 74 2c 64 78 2c |mapPtr,&|rect,dx,|
|00000250| 64 79 2c 72 61 6e 64 6f | 6d 50 68 61 73 65 29 3b |dy,rando|mPhase);|
|00000260| 0d 53 61 6d 65 2c 20 62 | 75 74 20 61 63 63 65 70 |.Same, b|ut accep|
|00000270| 74 73 20 61 20 70 69 78 | 2f 62 69 74 6d 61 70 20 |ts a pix|/bitmap |
|00000280| 70 74 72 20 69 6e 20 70 | 6c 61 63 65 20 6f 66 20 |ptr in p|lace of |
|00000290| 74 68 65 20 77 69 6e 64 | 6f 77 2e 0d 0d 09 65 72 |the wind|ow....er|
|000002a0| 72 6f 72 3d 4d 61 6b 65 | 4e 6f 69 73 65 31 28 64 |ror=Make|Noise1(d|
|000002b0| 78 2c 64 79 2c 72 61 6e | 64 6f 6d 50 68 61 73 65 |x,dy,ran|domPhase|
|000002c0| 2c 70 69 78 6d 61 70 50 | 74 72 29 3b 0d 53 61 6d |,pixmapP|tr);.Sam|
|000002d0| 65 2c 20 62 75 74 20 66 | 69 6c 6c 73 20 74 68 65 |e, but f|ills the|
|000002e0| 20 77 68 6f 6c 65 20 70 | 69 78 2f 62 69 74 6d 61 | whole p|ix/bitma|
|000002f0| 70 2c 20 69 2e 65 2e 20 | 75 73 65 73 20 70 69 78 |p, i.e. |uses pix|
|00000300| 6d 61 70 50 74 72 2d 3e | 62 6f 75 6e 64 73 20 61 |mapPtr->|bounds a|
|00000310| 73 20 74 68 65 20 72 65 | 63 74 2e 0d 4f 62 73 6f |s the re|ct..Obso|
|00000320| 6c 65 74 65 2c 20 72 65 | 74 61 69 6e 65 64 20 73 |lete, re|tained s|
|00000330| 6f 6c 65 6c 79 20 66 6f | 72 20 63 6f 6d 70 61 74 |olely fo|r compat|
|00000340| 69 62 69 6c 69 74 79 2e | 0d 0d 57 65 20 75 73 65 |ibility.|..We use|
|00000350| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 6f 72 | the cur|rent por|
|00000360| 74 27 73 20 46 6f 72 65 | 43 6f 6c 6f 72 20 61 6e |t's Fore|Color an|
|00000370| 64 20 42 61 63 6b 43 6f | 6c 6f 72 20 74 6f 20 6d |d BackCo|lor to m|
|00000380| 61 6b 65 20 74 68 65 20 | 6e 6f 69 73 65 2e 20 28 |ake the |noise. (|
|00000390| 49 66 0d 62 61 73 65 41 | 64 64 72 3d 3d 4e 55 4c |If.baseA|ddr==NUL|
|000003a0| 4c 2c 20 77 65 20 73 68 | 61 72 65 20 74 68 65 20 |L, we sh|are the |
|000003b0| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 20 6f 66 20 74 |color ta|ble of t|
|000003c0| 68 65 20 63 75 72 72 65 | 6e 74 20 64 65 76 69 63 |he curre|nt devic|
|000003d0| 65 2e 29 20 41 70 70 6c | 65 27 73 0d 47 65 74 47 |e.) Appl|e's.GetG|
|000003e0| 57 6f 72 6c 64 20 61 6e | 64 20 53 65 74 47 57 6f |World an|d SetGWo|
|000003f0| 72 6c 64 20 63 61 6c 6c | 73 20 61 72 65 20 61 20 |rld call|s are a |
|00000400| 63 6f 6e 76 65 6e 69 65 | 6e 74 20 77 61 79 20 6f |convenie|nt way o|
|00000410| 66 20 67 65 74 74 69 6e | 67 2c 20 63 68 61 6e 67 |f gettin|g, chang|
|00000420| 69 6e 67 2c 20 61 6e 64 | 0d 72 65 73 74 6f 72 69 |ing, and|.restori|
|00000430| 6e 67 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |ng the c|urrent p|
|00000440| 6f 72 74 20 61 6e 64 20 | 64 65 76 69 63 65 2e 0d |ort and |device..|
|00000450| 0d 49 66 20 70 69 78 6d | 61 70 50 74 72 2d 3e 62 |.If pixm|apPtr->b|
|00000460| 61 73 65 41 64 64 72 3d | 3d 4e 55 4c 4c 20 74 68 |aseAddr=|=NULL th|
|00000470| 65 6e 20 74 68 65 20 64 | 61 74 61 20 61 72 65 61 |en the d|ata area|
|00000480| 20 77 69 6c 6c 20 62 65 | 20 61 6c 6c 6f 63 61 74 | will be| allocat|
|00000490| 65 64 20 66 6f 72 20 79 | 6f 75 2e 20 59 6f 75 0d |ed for y|ou. You.|
|000004a0| 6d 75 73 74 20 73 65 74 | 20 70 69 78 6d 61 70 50 |must set| pixmapP|
|000004b0| 74 72 2d 3e 62 6f 75 6e | 64 73 20 61 6e 64 20 70 |tr->boun|ds and p|
|000004c0| 69 78 6d 61 70 50 74 72 | 2d 3e 70 69 78 65 6c 53 |ixmapPtr|->pixelS|
|000004d0| 69 7a 65 3b 20 74 68 65 | 20 72 65 73 74 20 6f 66 |ize; the| rest of|
|000004e0| 20 74 68 65 20 50 69 78 | 4d 61 70 0d 73 74 72 75 | the Pix|Map.stru|
|000004f0| 63 74 20 77 69 6c 6c 20 | 62 65 20 66 69 6c 6c 65 |ct will |be fille|
|00000500| 64 20 69 6e 20 62 79 20 | 4e 6f 69 73 65 46 69 6c |d in by |NoiseFil|
|00000510| 6c 42 69 74 73 2e 20 49 | 74 20 77 69 6c 6c 20 69 |lBits. I|t will i|
|00000520| 6e 73 74 61 6c 6c 20 61 | 20 68 61 6e 64 6c 65 20 |nstall a| handle |
|00000530| 74 6f 20 74 68 65 0d 63 | 75 72 72 65 6e 74 20 64 |to the.c|urrent d|
|00000540| 65 76 69 63 65 27 73 20 | 63 6f 6c 6f 72 20 74 61 |evice's |color ta|
|00000550| 62 6c 65 2e 20 54 68 65 | 20 76 61 6c 75 65 73 20 |ble. The| values |
|00000560| 66 69 6c 6c 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |filled i|nto the |
|00000570| 66 69 65 6c 64 73 20 61 | 72 65 20 6e 65 63 65 73 |fields a|re neces|
|00000580| 73 61 72 69 6c 79 0d 73 | 6f 6d 65 77 68 61 74 20 |sarily.s|omewhat |
|00000590| 61 72 62 69 74 72 61 72 | 79 2e 20 46 6f 72 20 6d |arbitrar|y. For m|
|000005a0| 6f 72 65 20 63 6f 6e 74 | 72 6f 6c 2c 20 66 69 6c |ore cont|rol, fil|
|000005b0| 6c 20 69 6e 20 74 68 65 | 20 66 69 65 6c 64 73 20 |l in the| fields |
|000005c0| 79 6f 75 72 73 65 6c 66 | 2c 20 75 73 69 6e 67 0d |yourself|, using.|
|000005d0| 4e 65 77 50 69 78 4d 61 | 70 28 29 2c 20 61 6e 64 |NewPixMa|p(), and|
|000005e0| 20 61 6c 6c 6f 63 61 74 | 65 20 74 68 65 20 64 61 | allocat|e the da|
|000005f0| 74 61 20 61 72 65 61 20 | 79 6f 75 72 73 65 6c 66 |ta area |yourself|
|00000600| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00000610| 4e 6f 69 73 65 46 69 6c | 6c 42 69 74 73 28 29 2e |NoiseFil|lBits().|
|00000620| 0d 0d 48 49 53 54 4f 52 | 59 3a 0d 36 2f 32 31 2f |..HISTOR|Y:.6/21/|
|00000630| 38 39 20 64 67 70 09 63 | 68 61 6e 67 65 64 20 66 |89 dgp.c|hanged f|
|00000640| 72 61 6d 65 42 79 74 65 | 73 20 61 6e 64 20 62 75 |rameByte|s and bu|
|00000650| 66 66 65 72 42 79 74 65 | 73 20 74 6f 20 6c 6f 6e |fferByte|s to lon|
|00000660| 67 20 73 6f 20 74 68 61 | 74 20 74 68 69 73 20 63 |g so tha|t this c|
|00000670| 6f 64 65 20 77 6f 6e 27 | 74 20 63 72 61 73 68 0d |ode won'|t crash.|
|00000680| 09 09 09 69 66 20 74 68 | 65 20 70 69 78 65 6c 53 |...if th|e pixelS|
|00000690| 69 7a 65 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |ize is g|reater t|
|000006a0| 68 61 6e 20 31 20 62 69 | 74 2e 0d 38 2f 35 2f 38 |han 1 bi|t..8/5/8|
|000006b0| 39 20 64 67 70 09 77 72 | 6f 74 65 20 61 6e 64 20 |9 dgp.wr|ote and |
|000006c0| 69 6e 73 74 61 6c 6c 65 | 64 20 72 61 6e 64 55 28 |installe|d randU(|
|000006d0| 29 2c 20 77 68 69 63 68 | 20 79 69 65 6c 64 73 20 |), which| yields |
|000006e0| 74 77 6f 20 72 61 6e 64 | 6f 6d 20 62 79 74 65 73 |two rand|om bytes|
|000006f0| 20 70 65 72 20 63 61 6c | 6c 2c 20 69 6e 73 74 65 | per cal|l, inste|
|00000700| 61 64 0d 09 09 09 6f 66 | 20 72 61 6e 64 28 29 20 |ad....of| rand() |
|00000710| 77 68 69 63 68 20 79 69 | 65 6c 64 73 20 6f 6e 6c |which yi|elds onl|
|00000720| 79 20 6f 6e 65 2c 20 61 | 6c 6c 6f 77 69 6e 67 20 |y one, a|llowing |
|00000730| 74 68 65 20 6e 6f 69 73 | 65 20 67 65 6e 65 72 61 |the nois|e genera|
|00000740| 74 69 6f 6e 20 74 6f 20 | 67 6f 20 74 77 69 63 65 |tion to |go twice|
|00000750| 0d 09 09 09 61 73 20 66 | 61 73 74 2e 0d 33 2f 31 |....as f|ast..3/1|
|00000760| 31 2f 39 30 20 64 67 70 | 09 43 68 61 6e 67 65 64 |1/90 dgp|.Changed|
|00000770| 20 64 78 20 61 6e 64 20 | 64 79 20 66 72 6f 6d 20 | dx and |dy from |
|00000780| 69 6e 74 20 74 6f 20 64 | 6f 75 62 6c 65 2e 20 54 |int to d|ouble. T|
|00000790| 68 69 73 20 61 6c 6c 6f | 77 73 20 6e 6f 6e 75 6e |his allo|ws nonun|
|000007a0| 69 66 6f 72 6d 20 63 65 | 6c 6c 20 73 69 7a 65 2c |iform ce|ll size,|
|000007b0| 0d 09 09 09 77 68 69 63 | 68 20 61 72 69 73 65 73 |....whic|h arises|
|000007c0| 20 77 68 65 6e 20 43 6f | 70 79 42 69 74 73 20 65 | when Co|pyBits e|
|000007d0| 78 70 61 6e 64 73 20 62 | 79 20 74 68 65 73 65 20 |xpands b|y these |
|000007e0| 6e 6f 6e 69 6e 74 65 67 | 72 61 6c 20 66 61 63 74 |noninteg|ral fact|
|000007f0| 6f 72 73 2e 20 52 65 73 | 75 6c 74 73 0d 09 09 09 |ors. Res|ults....|
|00000800| 77 69 6c 6c 20 62 65 20 | 73 61 6d 65 20 61 73 20 |will be |same as |
|00000810| 62 65 66 6f 72 65 20 77 | 68 65 6e 20 69 6e 74 65 |before w|hen inte|
|00000820| 67 72 61 6c 20 76 61 6c | 75 65 73 20 61 72 65 20 |gral val|ues are |
|00000830| 73 75 70 70 6c 69 65 64 | 2e 0d 09 09 09 4d 61 64 |supplied|.....Mad|
|00000840| 65 20 74 68 65 20 63 6f | 73 6d 65 74 69 63 20 63 |e the co|smetic c|
|00000850| 68 61 6e 67 65 20 6f 66 | 20 72 65 70 6c 61 63 69 |hange of| replaci|
|00000860| 6e 67 20 22 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |ng "unsi|gned lon|
|00000870| 67 22 20 62 79 20 22 73 | 69 7a 65 5f 74 22 2e 0d |g" by "s|ize_t"..|
|00000880| 33 2f 32 30 2f 39 30 09 | 64 67 70 09 6d 61 6b 65 |3/20/90.|dgp.make|
|00000890| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|000008a0| 20 4d 50 57 20 43 2e 0d | 33 2f 33 31 2f 39 30 09 | MPW C..|3/31/90.|
|000008b0| 64 67 70 09 73 65 74 20 | 70 6d 56 65 72 73 69 6f |dgp.set |pmVersio|
|000008c0| 6e 20 74 6f 20 7a 65 72 | 6f 20 66 6f 72 20 63 6f |n to zer|o for co|
|000008d0| 6d 70 61 74 69 62 69 6c | 69 74 79 20 77 69 74 68 |mpatibil|ity with|
|000008e0| 20 51 44 33 32 0d 38 2f | 37 2f 39 30 09 64 67 70 | QD32.8/|7/90.dgp|
|000008f0| 09 4e 6f 77 20 75 73 65 | 73 20 74 68 65 20 63 75 |.Now use|s the cu|
|00000900| 72 72 65 6e 74 20 46 6f | 72 65 43 6f 6c 6f 72 20 |rrent Fo|reColor |
|00000910| 61 6e 64 20 42 61 63 6b | 43 6f 6c 6f 72 20 74 6f |and Back|Color to|
|00000920| 20 6d 61 6b 65 20 74 68 | 65 20 6e 6f 69 73 65 2e | make th|e noise.|
|00000930| 0d 09 09 09 46 6f 72 20 | 66 75 74 75 72 65 20 63 |....For |future c|
|00000940| 6f 6d 70 61 74 69 62 69 | 6c 69 74 79 2c 20 6e 6f |ompatibi|lity, no|
|00000950| 77 20 7a 65 72 6f 65 73 | 20 74 68 65 20 70 61 63 |w zeroes| the pac|
|00000960| 6b 54 79 70 65 2c 20 65 | 74 63 2e 20 66 69 65 6c |kType, e|tc. fiel|
|00000970| 64 73 2e 0d 31 30 2f 31 | 2f 39 30 09 64 67 70 09 |ds..10/1|/90.dgp.|
|00000980| 43 6f 73 6d 65 74 69 63 | 20 63 68 61 6e 67 65 73 |Cosmetic| changes|
|00000990| 3a 20 72 65 70 6c 61 63 | 65 64 20 74 77 6f 20 4f |: replac|ed two O|
|000009a0| 66 66 73 65 74 52 65 63 | 74 20 63 61 6c 6c 73 20 |ffsetRec|t calls |
|000009b0| 62 79 20 43 65 6e 74 65 | 72 52 65 63 74 49 6e 52 |by Cente|rRectInR|
|000009c0| 65 63 74 20 63 61 6c 6c | 2e 0d 31 31 2f 31 36 2f |ect call|..11/16/|
|000009d0| 39 30 20 64 67 70 20 41 | 64 64 65 64 20 52 41 4e |90 dgp A|dded RAN|
|000009e0| 44 4f 4d 5f 50 48 41 53 | 45 2e 0d 34 2f 32 30 2f |DOM_PHAS|E..4/20/|
|000009f0| 39 31 09 64 67 70 09 41 | 64 64 65 64 20 6e 65 77 |91.dgp.A|dded new|
|00000a00| 20 4d 61 6b 65 4e 6f 69 | 73 65 31 28 29 20 74 68 | MakeNoi|se1() th|
|00000a10| 61 74 20 61 63 63 65 70 | 74 73 20 61 20 73 69 6e |at accep|ts a sin|
|00000a20| 67 6c 65 20 50 69 78 4d | 61 70 2c 20 61 6e 64 20 |gle PixM|ap, and |
|00000a30| 61 6c 6c 6f 63 61 74 65 | 73 0d 09 09 09 69 74 73 |allocate|s....its|
|00000a40| 20 64 61 74 61 20 61 72 | 65 61 20 6f 6e 6c 79 20 | data ar|ea only |
|00000a50| 69 66 20 62 61 73 65 41 | 64 64 72 3d 3d 4e 55 4c |if baseA|ddr==NUL|
|00000a60| 4c 2c 20 6f 74 68 65 72 | 77 69 73 65 20 61 73 73 |L, other|wise ass|
|00000a70| 75 6d 69 6e 67 20 74 68 | 61 74 20 69 74 20 61 6c |uming th|at it al|
|00000a80| 72 65 61 64 79 0d 09 09 | 09 65 78 69 73 74 73 2e |ready...|.exists.|
|00000a90| 20 49 20 72 65 77 72 6f | 74 65 20 4d 61 6b 65 4e | I rewro|te MakeN|
|00000aa0| 6f 69 73 65 28 29 20 74 | 6f 20 73 69 6d 70 6c 79 |oise() t|o simply|
|00000ab0| 20 63 61 6c 6c 20 4d 61 | 6b 65 4e 6f 69 73 65 31 | call Ma|keNoise1|
|00000ac0| 28 29 20 72 65 70 65 61 | 74 65 64 6c 79 2e 0d 09 |() repea|tedly...|
|00000ad0| 09 09 4d 61 6b 65 4e 6f | 69 73 65 28 29 20 6e 6f |..MakeNo|ise() no|
|00000ae0| 77 20 73 65 65 6d 73 20 | 6f 62 73 6f 6c 65 74 65 |w seems |obsolete|
|00000af0| 2c 20 62 75 74 20 69 73 | 20 72 65 74 61 69 6e 65 |, but is| retaine|
|00000b00| 64 20 66 6f 72 20 63 6f | 6d 70 61 74 69 62 69 6c |d for co|mpatibil|
|00000b10| 69 74 79 20 77 69 74 68 | 20 6f 6c 64 0d 09 09 09 |ity with| old....|
|00000b20| 70 72 6f 67 72 61 6d 73 | 2e 0d 34 2f 32 34 2f 39 |programs|..4/24/9|
|00000b30| 31 09 64 67 70 09 46 69 | 78 65 64 20 62 75 67 20 |1.dgp.Fi|xed bug |
|00000b40| 69 6e 74 72 6f 64 75 63 | 65 64 20 69 6e 74 6f 20 |introduc|ed into |
|00000b50| 4d 61 6b 65 4e 6f 69 73 | 65 28 29 20 6f 6e 20 34 |MakeNois|e() on 4|
|00000b60| 2f 32 30 2c 20 77 68 69 | 63 68 20 72 65 73 75 6c |/20, whi|ch resul|
|00000b70| 74 65 64 20 69 6e 20 61 | 6c 6c 20 74 68 65 0d 09 |ted in a|ll the..|
|00000b80| 09 09 50 69 78 4d 61 70 | 73 20 75 73 69 6e 67 20 |..PixMap|s using |
|00000b90| 74 68 65 20 73 61 6d 65 | 20 62 75 66 66 65 72 2e |the same| buffer.|
|00000ba0| 0d 38 2f 36 2f 39 31 09 | 64 67 70 09 52 65 70 6c |.8/6/91.|dgp.Repl|
|00000bb0| 61 63 65 64 20 75 73 65 | 20 6f 66 20 72 61 6e 64 |aced use| of rand|
|00000bc0| 55 28 29 20 62 79 20 52 | 61 6e 64 46 69 6c 6c 28 |U() by R|andFill(|
|00000bd0| 29 2c 20 77 68 69 63 68 | 20 69 73 20 74 77 69 63 |), which| is twic|
|00000be0| 65 20 61 73 20 66 61 73 | 74 2e 0d 38 2f 32 34 2f |e as fas|t..8/24/|
|00000bf0| 39 31 09 64 67 70 09 4d | 61 64 65 20 63 6f 6d 70 |91.dgp.M|ade comp|
|00000c00| 61 74 69 62 6c 65 20 77 | 69 74 68 20 54 48 49 4e |atible w|ith THIN|
|00000c10| 4b 20 43 20 35 2e 30 2e | 0d 34 2f 31 37 2f 39 32 |K C 5.0.|.4/17/92|
|00000c20| 09 64 67 70 09 52 65 6d | 6f 76 65 64 20 68 69 64 |.dgp.Rem|oved hid|
|00000c30| 64 65 6e 20 61 73 73 75 | 6d 70 74 69 6f 6e 20 74 |den assu|mption t|
|00000c40| 68 61 74 20 62 69 74 73 | 2d 3e 62 6f 75 6e 64 73 |hat bits|->bounds|
|00000c50| 2e 74 6f 70 20 61 6e 64 | 20 62 69 74 73 2d 3e 62 |.top and| bits->b|
|00000c60| 6f 75 6e 64 73 2e 6c 65 | 66 74 0d 09 09 09 77 65 |ounds.le|ft....we|
|00000c70| 72 65 20 62 6f 74 68 20 | 7a 65 72 6f 2e 20 49 66 |re both |zero. If|
|00000c80| 20 74 68 65 79 20 77 65 | 72 65 20 6e 65 67 61 74 | they we|re negat|
|00000c90| 69 76 65 20 4d 61 6b 65 | 4e 6f 69 73 65 31 20 77 |ive Make|Noise1 w|
|00000ca0| 6f 75 6c 64 20 61 6c 6c | 6f 63 61 74 65 20 74 6f |ould all|ocate to|
|00000cb0| 6f 20 0d 09 09 09 6c 69 | 74 74 6c 65 20 73 70 61 |o ....li|ttle spa|
|00000cc0| 63 65 2c 20 61 6e 64 20 | 74 68 65 6e 20 6f 76 65 |ce, and |then ove|
|00000cd0| 72 77 72 69 74 65 20 6d | 65 6d 6f 72 79 20 61 6e |rwrite m|emory an|
|00000ce0| 64 20 63 72 61 73 68 2e | 0d 34 2f 32 37 2f 39 32 |d crash.|.4/27/92|
|00000cf0| 09 64 67 70 09 49 6e 69 | 74 69 61 6c 69 7a 65 20 |.dgp.Ini|tialize |
|00000d00| 61 6c 6c 20 72 65 6d 61 | 69 6e 69 6e 67 20 66 69 |all rema|ining fi|
|00000d10| 65 6c 64 73 20 6f 66 20 | 74 68 65 20 2a 62 69 74 |elds of |the *bit|
|00000d20| 73 20 50 69 78 4d 61 70 | 2c 20 61 6e 64 20 63 6f |s PixMap|, and co|
|00000d30| 70 79 20 74 68 65 20 63 | 75 72 72 65 6e 74 0d 09 |py the c|urrent..|
|00000d40| 09 09 64 65 76 69 63 65 | 27 73 20 63 6f 6c 6f 72 |..device|'s color|
|00000d50| 20 74 61 62 6c 65 20 68 | 61 6e 64 6c 65 2e 0d 31 | table h|andle..1|
|00000d60| 30 2f 32 32 2f 39 32 20 | 64 67 70 20 43 68 65 63 |0/22/92 |dgp Chec|
|00000d70| 6b 20 66 6f 72 20 65 72 | 72 6f 72 20 69 6e 20 43 |k for er|ror in C|
|00000d80| 6f 70 79 42 69 74 73 2e | 0d 39 2f 35 2f 39 34 20 |opyBits.|.9/5/94 |
|00000d90| 64 67 70 20 72 65 6d 6f | 76 65 64 20 61 73 73 75 |dgp remo|ved assu|
|00000da0| 6d 70 74 69 6f 6e 20 69 | 6e 20 70 72 69 6e 74 66 |mption i|n printf|
|00000db0| 27 73 20 74 68 61 74 20 | 69 6e 74 3d 3d 73 68 6f |'s that |int==sho|
|00000dc0| 72 74 2e 0d 31 31 2f 32 | 31 2f 39 34 20 64 67 70 |rt..11/2|1/94 dgp|
|00000dd0| 20 69 6e 20 72 65 73 70 | 6f 6e 73 65 20 74 6f 20 | in resp|onse to |
|00000de0| 6e 6f 74 65 20 66 72 6f | 6d 20 4d 61 72 74 79 20 |note fro|m Marty |
|00000df0| 57 61 63 68 74 65 72 2c | 20 69 6d 70 72 6f 76 65 |Wachter,| improve|
|00000e00| 20 63 65 6e 74 65 72 69 | 6e 67 20 61 6c 67 6f 72 | centeri|ng algor|
|00000e10| 69 74 68 6d 2c 20 73 6f | 0d 09 09 09 74 68 61 74 |ithm, so|....that|
|00000e20| 20 69 66 20 64 78 20 26 | 20 64 79 20 61 72 65 20 | if dx &| dy are |
|00000e30| 69 6e 74 65 67 72 61 6c | 20 74 68 65 20 66 69 6e |integral| the fin|
|00000e40| 61 6c 20 69 6d 61 67 65 | 20 69 73 20 6d 61 64 65 |al image| is made|
|00000e50| 20 6f 66 20 77 68 6f 6c | 65 20 63 68 65 63 6b 73 | of whol|e checks|
|00000e60| 2e 0d 31 31 2f 32 31 2f | 39 34 20 64 67 70 20 72 |..11/21/|94 dgp r|
|00000e70| 65 6e 61 6d 65 64 20 4e | 6f 69 73 65 46 69 6c 6c |enamed N|oiseFill|
|00000e80| 2e 63 20 61 6e 64 20 61 | 64 64 65 64 20 6e 65 77 |.c and a|dded new|
|00000e90| 20 63 61 6c 6c 69 6e 67 | 20 69 6e 74 65 72 66 61 | calling| interfa|
|00000ea0| 63 65 73 2c 20 61 6e 61 | 6c 6f 67 6f 75 73 20 74 |ces, ana|logous t|
|00000eb0| 6f 20 74 68 6f 73 65 0d | 09 09 09 66 6f 72 20 43 |o those.|...for C|
|00000ec0| 6f 70 79 57 69 6e 64 6f | 77 73 20 61 6e 64 20 43 |opyWindo|ws and C|
|00000ed0| 6f 70 79 42 69 74 73 2e | 0d 2a 2f 0d 23 69 6e 63 |opyBits.|.*/.#inc|
|00000ee0| 6c 75 64 65 20 22 56 69 | 64 65 6f 54 6f 6f 6c 62 |lude "Vi|deoToolb|
|00000ef0| 6f 78 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ox.h".#i|nclude <|
|00000f00| 6d 61 74 68 2e 68 3e 0d | 0d 69 6e 74 20 4d 61 6b |math.h>.|.int Mak|
|00000f10| 65 4e 6f 69 73 65 31 28 | 64 6f 75 62 6c 65 20 64 |eNoise1(|double d|
|00000f20| 78 2c 64 6f 75 62 6c 65 | 20 64 79 2c 42 6f 6f 6c |x,double| dy,Bool|
|00000f30| 65 61 6e 20 72 61 6e 64 | 6f 6d 50 68 61 73 65 2c |ean rand|omPhase,|
|00000f40| 50 69 78 4d 61 70 20 2a | 62 69 74 73 29 0d 7b 0d |PixMap *|bits).{.|
|00000f50| 09 72 65 74 75 72 6e 20 | 4e 6f 69 73 65 46 69 6c |.return |NoiseFil|
|00000f60| 6c 42 69 74 73 28 62 69 | 74 73 2c 26 62 69 74 73 |lBits(bi|ts,&bits|
|00000f70| 2d 3e 62 6f 75 6e 64 73 | 2c 64 78 2c 64 79 2c 72 |->bounds|,dx,dy,r|
|00000f80| 61 6e 64 6f 6d 50 68 61 | 73 65 29 3b 0d 7d 0d 0d |andomPha|se);.}..|
|00000f90| 69 6e 74 20 4e 6f 69 73 | 65 46 69 6c 6c 28 43 57 |int Nois|eFill(CW|
|00000fa0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 2c |indowPtr| window,|
|00000fb0| 52 65 63 74 20 2a 72 2c | 64 6f 75 62 6c 65 20 64 |Rect *r,|double d|
|00000fc0| 78 2c 64 6f 75 62 6c 65 | 20 64 79 2c 42 6f 6f 6c |x,double| dy,Bool|
|00000fd0| 65 61 6e 20 72 61 6e 64 | 6f 6d 50 68 61 73 65 29 |ean rand|omPhase)|
|00000fe0| 0d 7b 0d 09 42 6f 6f 6c | 65 61 6e 20 65 72 72 6f |.{..Bool|ean erro|
|00000ff0| 72 2c 6f 6b 3b 0d 0d 09 | 69 66 28 49 73 47 57 6f |r,ok;...|if(IsGWo|
|00001000| 72 6c 64 50 74 72 28 77 | 69 6e 64 6f 77 29 29 7b |rldPtr(w|indow)){|
|00001010| 0d 09 09 6f 6b 3d 4c 6f | 63 6b 50 69 78 65 6c 73 |...ok=Lo|ckPixels|
|00001020| 28 77 69 6e 64 6f 77 2d | 3e 70 6f 72 74 50 69 78 |(window-|>portPix|
|00001030| 4d 61 70 29 3b 0d 09 09 | 69 66 28 21 6f 6b 29 72 |Map);...|if(!ok)r|
|00001040| 65 74 75 72 6e 20 32 3b | 0d 09 7d 0d 09 69 66 28 |eturn 2;|..}..if(|
|00001050| 49 73 47 72 61 66 50 74 | 72 28 77 69 6e 64 6f 77 |IsGrafPt|r(window|
|00001060| 29 29 0d 09 09 65 72 72 | 6f 72 3d 4e 6f 69 73 65 |))...err|or=Noise|
|00001070| 46 69 6c 6c 42 69 74 73 | 28 28 50 69 78 4d 61 70 |FillBits|((PixMap|
|00001080| 20 2a 29 26 28 28 57 69 | 6e 64 6f 77 50 74 72 29 | *)&((Wi|ndowPtr)|
|00001090| 77 69 6e 64 6f 77 29 2d | 3e 70 6f 72 74 42 69 74 |window)-|>portBit|
|000010a0| 73 2c 72 2c 64 78 2c 64 | 79 2c 72 61 6e 64 6f 6d |s,r,dx,d|y,random|
|000010b0| 50 68 61 73 65 29 3b 0d | 09 65 6c 73 65 7b 0d 09 |Phase);.|.else{..|
|000010c0| 09 48 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 77 |.HLock((|Handle)w|
|000010d0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 50 69 78 4d 61 |indow->p|ortPixMa|
|000010e0| 70 29 3b 0d 09 09 65 72 | 72 6f 72 3d 4e 6f 69 73 |p);...er|ror=Nois|
|000010f0| 65 46 69 6c 6c 42 69 74 | 73 28 2a 77 69 6e 64 6f |eFillBit|s(*windo|
|00001100| 77 2d 3e 70 6f 72 74 50 | 69 78 4d 61 70 2c 72 2c |w->portP|ixMap,r,|
|00001110| 64 78 2c 64 79 2c 72 61 | 6e 64 6f 6d 50 68 61 73 |dx,dy,ra|ndomPhas|
|00001120| 65 29 3b 0d 09 09 48 55 | 6e 6c 6f 63 6b 28 28 48 |e);...HU|nlock((H|
|00001130| 61 6e 64 6c 65 29 77 69 | 6e 64 6f 77 2d 3e 70 6f |andle)wi|ndow->po|
|00001140| 72 74 50 69 78 4d 61 70 | 29 3b 0d 09 7d 0d 09 69 |rtPixMap|);..}..i|
|00001150| 66 28 49 73 47 57 6f 72 | 6c 64 50 74 72 28 77 69 |f(IsGWor|ldPtr(wi|
|00001160| 6e 64 6f 77 29 29 55 6e | 6c 6f 63 6b 50 69 78 65 |ndow))Un|lockPixe|
|00001170| 6c 73 28 77 69 6e 64 6f | 77 2d 3e 70 6f 72 74 50 |ls(windo|w->portP|
|00001180| 69 78 4d 61 70 29 3b 0d | 09 72 65 74 75 72 6e 20 |ixMap);.|.return |
|00001190| 65 72 72 6f 72 3b 0d 7d | 0d 0d 69 6e 74 20 4e 6f |error;.}|..int No|
|000011a0| 69 73 65 46 69 6c 6c 42 | 69 74 73 28 50 69 78 4d |iseFillB|its(PixM|
|000011b0| 61 70 20 2a 62 69 74 73 | 2c 52 65 63 74 20 2a 72 |ap *bits|,Rect *r|
|000011c0| 2c 64 6f 75 62 6c 65 20 | 64 78 2c 64 6f 75 62 6c |,double |dx,doubl|
|000011d0| 65 20 64 79 2c 42 6f 6f | 6c 65 61 6e 20 72 61 6e |e dy,Boo|lean ran|
|000011e0| 64 6f 6d 50 68 61 73 65 | 29 0d 7b 0d 09 42 69 74 |domPhase|).{..Bit|
|000011f0| 4d 61 70 20 62 75 66 66 | 65 72 2c 62 69 67 42 75 |Map buff|er,bigBu|
|00001200| 66 66 65 72 3b 0d 09 52 | 65 63 74 20 73 72 63 52 |ffer;..R|ect srcR|
|00001210| 65 63 74 3b 0d 09 73 69 | 7a 65 5f 74 20 66 72 61 |ect;..si|ze_t fra|
|00001220| 6d 65 42 79 74 65 73 2c | 62 75 66 66 65 72 42 79 |meBytes,|bufferBy|
|00001230| 74 65 73 3b 0d 09 73 74 | 61 74 69 63 20 63 6f 6e |tes;..st|atic con|
|00001240| 73 74 20 52 47 42 43 6f | 6c 6f 72 20 62 6c 61 63 |st RGBCo|lor blac|
|00001250| 6b 52 47 42 3d 7b 30 2c | 30 2c 30 7d 2c 77 68 69 |kRGB={0,|0,0},whi|
|00001260| 74 65 52 47 42 3d 7b 30 | 78 66 66 66 66 2c 30 78 |teRGB={0|xffff,0x|
|00001270| 66 66 66 66 2c 30 78 66 | 66 66 66 7d 3b 0d 09 52 |ffff,0xf|fff};..R|
|00001280| 47 42 43 6f 6c 6f 72 20 | 62 61 63 6b 52 47 42 2c |GBColor |backRGB,|
|00001290| 66 6f 72 65 52 47 42 3b | 0d 09 69 6e 74 20 65 72 |foreRGB;|..int er|
|000012a0| 72 6f 72 3b 0d 09 0d 09 | 69 66 28 64 78 3c 3d 30 |ror;....|if(dx<=0|
|000012b0| 20 7c 7c 20 64 79 3c 3d | 30 29 72 65 74 75 72 6e | || dy<=|0)return|
|000012c0| 20 33 3b 0d 09 73 72 61 | 6e 64 55 28 28 75 6e 73 | 3;..sra|ndU((uns|
|000012d0| 69 67 6e 65 64 20 69 6e | 74 29 72 61 6e 64 28 29 |igned in|t)rand()|
|000012e0| 29 3b 09 2f 2a 20 73 65 | 65 64 20 6f 75 72 20 75 |);./* se|ed our u|
|000012f0| 6e 73 69 67 6e 65 64 20 | 72 61 6e 64 6f 6d 20 6e |nsigned |random n|
|00001300| 75 6d 62 65 72 20 67 65 | 6e 65 72 61 74 6f 72 20 |umber ge|nerator |
|00001310| 2a 2f 0d 09 47 65 74 42 | 61 63 6b 43 6f 6c 6f 72 |*/..GetB|ackColor|
|00001320| 28 26 62 61 63 6b 52 47 | 42 29 3b 0d 09 47 65 74 |(&backRG|B);..Get|
|00001330| 46 6f 72 65 43 6f 6c 6f | 72 28 26 66 6f 72 65 52 |ForeColo|r(&foreR|
|00001340| 47 42 29 3b 0d 0d 09 2f | 2a 20 61 6c 6c 6f 63 61 |GB);.../|* alloca|
|00001350| 74 65 20 62 75 66 66 65 | 72 20 42 69 74 4d 61 70 |te buffe|r BitMap|
|00001360| 20 2a 2f 0d 09 53 65 74 | 52 65 63 74 28 26 62 75 | */..Set|Rect(&bu|
|00001370| 66 66 65 72 2e 62 6f 75 | 6e 64 73 2c 30 2c 30 2c |ffer.bou|nds,0,0,|
|00001380| 63 65 69 6c 28 28 72 2d | 3e 72 69 67 68 74 20 2d |ceil((r-|>right -|
|00001390| 20 72 2d 3e 6c 65 66 74 | 29 2f 64 78 29 2c 63 65 | r->left|)/dx),ce|
|000013a0| 69 6c 28 28 72 2d 3e 62 | 6f 74 74 6f 6d 20 2d 20 |il((r->b|ottom - |
|000013b0| 72 2d 3e 74 6f 70 29 2f | 64 79 29 29 3b 0d 09 69 |r->top)/|dy));..i|
|000013c0| 66 28 72 61 6e 64 6f 6d | 50 68 61 73 65 29 7b 0d |f(random|Phase){.|
|000013d0| 09 09 62 75 66 66 65 72 | 2e 62 6f 75 6e 64 73 2e |..buffer|.bounds.|
|000013e0| 72 69 67 68 74 2b 2b 3b | 0d 09 09 62 75 66 66 65 |right++;|...buffe|
|000013f0| 72 2e 62 6f 75 6e 64 73 | 2e 62 6f 74 74 6f 6d 2b |r.bounds|.bottom+|
|00001400| 2b 3b 0d 09 7d 0d 09 62 | 75 66 66 65 72 2e 72 6f |+;..}..b|uffer.ro|
|00001410| 77 42 79 74 65 73 3d 28 | 62 75 66 66 65 72 2e 62 |wBytes=(|buffer.b|
|00001420| 6f 75 6e 64 73 2e 72 69 | 67 68 74 20 2b 20 33 31 |ounds.ri|ght + 31|
|00001430| 20 26 20 7e 33 31 29 2f | 38 3b 20 2f 2a 20 72 6f | & ~31)/|8; /* ro|
|00001440| 75 6e 64 20 75 70 20 74 | 6f 20 6d 75 6c 74 69 70 |und up t|o multip|
|00001450| 6c 65 20 6f 66 20 33 32 | 20 62 69 74 73 20 2a 2f |le of 32| bits */|
|00001460| 0d 09 62 75 66 66 65 72 | 42 79 74 65 73 3d 28 73 |..buffer|Bytes=(s|
|00001470| 69 7a 65 5f 74 29 20 62 | 75 66 66 65 72 2e 72 6f |ize_t) b|uffer.ro|
|00001480| 77 42 79 74 65 73 20 2a | 20 28 73 69 7a 65 5f 74 |wBytes *| (size_t|
|00001490| 29 20 62 75 66 66 65 72 | 2e 62 6f 75 6e 64 73 2e |) buffer|.bounds.|
|000014a0| 62 6f 74 74 6f 6d 3b 0d | 09 62 75 66 66 65 72 2e |bottom;.|.buffer.|
|000014b0| 62 61 73 65 41 64 64 72 | 3d 28 50 74 72 29 20 4e |baseAddr|=(Ptr) N|
|000014c0| 65 77 50 74 72 28 62 75 | 66 66 65 72 42 79 74 65 |ewPtr(bu|fferByte|
|000014d0| 73 29 3b 0d 09 69 66 28 | 62 75 66 66 65 72 2e 62 |s);..if(|buffer.b|
|000014e0| 61 73 65 41 64 64 72 20 | 3d 3d 20 4e 55 4c 4c 29 |aseAddr |== NULL)|
|000014f0| 72 65 74 75 72 6e 20 34 | 3b 0d 0d 09 2f 2a 20 61 |return 4|;.../* a|
|00001500| 6c 6c 6f 63 61 74 65 20 | 62 69 67 42 75 66 66 65 |llocate |bigBuffe|
|00001510| 72 20 42 69 74 4d 61 70 | 20 2a 2f 0d 09 53 65 74 |r BitMap| */..Set|
|00001520| 52 65 63 74 20 28 26 62 | 69 67 42 75 66 66 65 72 |Rect (&b|igBuffer|
|00001530| 2e 62 6f 75 6e 64 73 2c | 30 2c 30 2c 28 69 6e 74 |.bounds,|0,0,(int|
|00001540| 29 66 6c 6f 6f 72 28 62 | 75 66 66 65 72 2e 62 6f |)floor(b|uffer.bo|
|00001550| 75 6e 64 73 2e 72 69 67 | 68 74 2a 64 78 2b 30 2e |unds.rig|ht*dx+0.|
|00001560| 35 29 2c 0d 09 09 28 69 | 6e 74 29 66 6c 6f 6f 72 |5),...(i|nt)floor|
|00001570| 28 62 75 66 66 65 72 2e | 62 6f 75 6e 64 73 2e 62 |(buffer.|bounds.b|
|00001580| 6f 74 74 6f 6d 2a 64 79 | 2b 30 2e 35 29 29 3b 0d |ottom*dy|+0.5));.|
|00001590| 09 62 69 67 42 75 66 66 | 65 72 2e 72 6f 77 42 79 |.bigBuff|er.rowBy|
|000015a0| 74 65 73 3d 28 62 69 67 | 42 75 66 66 65 72 2e 62 |tes=(big|Buffer.b|
|000015b0| 6f 75 6e 64 73 2e 72 69 | 67 68 74 20 2b 20 33 31 |ounds.ri|ght + 31|
|000015c0| 20 26 20 7e 33 31 29 2f | 38 3b 20 2f 2a 20 72 6f | & ~31)/|8; /* ro|
|000015d0| 75 6e 64 20 75 70 20 74 | 6f 20 6d 75 6c 74 69 70 |und up t|o multip|
|000015e0| 6c 65 20 6f 66 20 33 32 | 20 62 69 74 73 20 2a 2f |le of 32| bits */|
|000015f0| 0d 09 62 69 67 42 75 66 | 66 65 72 2e 62 61 73 65 |..bigBuf|fer.base|
|00001600| 41 64 64 72 3d 28 50 74 | 72 29 20 4e 65 77 50 74 |Addr=(Pt|r) NewPt|
|00001610| 72 28 28 73 69 7a 65 5f | 74 29 20 62 69 67 42 75 |r((size_|t) bigBu|
|00001620| 66 66 65 72 2e 72 6f 77 | 42 79 74 65 73 20 2a 20 |ffer.row|Bytes * |
|00001630| 28 73 69 7a 65 5f 74 29 | 20 62 69 67 42 75 66 66 |(size_t)| bigBuff|
|00001640| 65 72 2e 62 6f 75 6e 64 | 73 2e 62 6f 74 74 6f 6d |er.bound|s.bottom|
|00001650| 29 3b 0d 09 69 66 28 62 | 69 67 42 75 66 66 65 72 |);..if(b|igBuffer|
|00001660| 2e 62 61 73 65 41 64 64 | 72 20 3d 3d 20 4e 55 4c |.baseAdd|r == NUL|
|00001670| 4c 29 7b 0d 09 09 44 69 | 73 70 6f 73 65 50 74 72 |L){...Di|sposePtr|
|00001680| 28 62 75 66 66 65 72 2e | 62 61 73 65 41 64 64 72 |(buffer.|baseAddr|
|00001690| 29 3b 0d 09 09 72 65 74 | 75 72 6e 20 35 3b 0d 09 |);...ret|urn 5;..|
|000016a0| 7d 0d 09 2f 2a 20 69 66 | 20 6e 65 63 65 73 73 61 |}../* if| necessa|
|000016b0| 72 79 2c 20 66 69 6c 6c | 20 69 6e 20 70 69 78 6d |ry, fill| in pixm|
|000016c0| 61 70 27 73 20 66 69 65 | 6c 64 73 20 61 6e 64 20 |ap's fie|lds and |
|000016d0| 61 6c 6c 6f 63 61 74 65 | 20 69 74 73 20 64 61 74 |allocate| its dat|
|000016e0| 61 20 61 72 65 61 20 2a | 2f 0d 09 69 66 28 62 69 |a area *|/..if(bi|
|000016f0| 74 73 2d 3e 62 61 73 65 | 41 64 64 72 20 3d 3d 20 |ts->base|Addr == |
|00001700| 4e 55 4c 4c 29 7b 0d 09 | 09 2f 2f 20 49 66 20 77 |NULL){..|.// If w|
|00001710| 65 27 72 65 20 61 6c 6c | 6f 63 61 74 69 6e 67 2c |e're all|ocating,|
|00001720| 20 61 73 73 75 6d 65 20 | 2a 62 69 74 73 20 69 73 | assume |*bits is|
|00001730| 20 61 20 50 69 78 4d 61 | 70 2c 20 6e 6f 74 20 61 | a PixMa|p, not a|
|00001740| 20 42 69 74 6d 61 70 2e | 0d 09 09 62 69 74 73 2d | Bitmap.|...bits-|
|00001750| 3e 68 52 65 73 3d 62 69 | 74 73 2d 3e 76 52 65 73 |>hRes=bi|ts->vRes|
|00001760| 3d 30 78 34 38 30 30 30 | 30 3b 09 2f 2f 20 37 32 |=0x48000|0;.// 72|
|00001770| 20 64 70 69 0d 09 09 62 | 69 74 73 2d 3e 70 6d 56 | dpi...b|its->pmV|
|00001780| 65 72 73 69 6f 6e 3d 62 | 69 74 73 2d 3e 70 61 63 |ersion=b|its->pac|
|00001790| 6b 54 79 70 65 3d 62 69 | 74 73 2d 3e 70 61 63 6b |kType=bi|ts->pack|
|000017a0| 53 69 7a 65 3d 30 3b 0d | 09 09 62 69 74 73 2d 3e |Size=0;.|..bits->|
|000017b0| 70 6c 61 6e 65 42 79 74 | 65 73 3d 62 69 74 73 2d |planeByt|es=bits-|
|000017c0| 3e 70 6d 52 65 73 65 72 | 76 65 64 3d 30 3b 0d 09 |>pmReser|ved=0;..|
|000017d0| 09 62 69 74 73 2d 3e 63 | 6d 70 43 6f 75 6e 74 3d |.bits->c|mpCount=|
|000017e0| 31 3b 0d 09 09 62 69 74 | 73 2d 3e 63 6d 70 53 69 |1;...bit|s->cmpSi|
|000017f0| 7a 65 3d 62 69 74 73 2d | 3e 70 69 78 65 6c 53 69 |ze=bits-|>pixelSi|
|00001800| 7a 65 3b 0d 09 09 62 69 | 74 73 2d 3e 70 6d 54 61 |ze;...bi|ts->pmTa|
|00001810| 62 6c 65 3d 28 2a 2a 28 | 2a 2a 47 65 74 47 44 65 |ble=(**(|**GetGDe|
|00001820| 76 69 63 65 28 29 29 2e | 67 64 50 4d 61 70 29 2e |vice()).|gdPMap).|
|00001830| 70 6d 54 61 62 6c 65 3b | 0d 09 09 62 69 74 73 2d |pmTable;|...bits-|
|00001840| 3e 72 6f 77 42 79 74 65 | 73 3d 28 28 62 69 74 73 |>rowByte|s=((bits|
|00001850| 2d 3e 62 6f 75 6e 64 73 | 2e 72 69 67 68 74 2d 62 |->bounds|.right-b|
|00001860| 69 74 73 2d 3e 62 6f 75 | 6e 64 73 2e 6c 65 66 74 |its->bou|nds.left|
|00001870| 29 2a 62 69 74 73 2d 3e | 70 69 78 65 6c 53 69 7a |)*bits->|pixelSiz|
|00001880| 65 20 2b 20 33 31 20 26 | 20 7e 33 31 29 2f 38 3b |e + 31 &| ~31)/8;|
|00001890| 20 2f 2a 20 72 6f 75 6e | 64 20 75 70 20 74 6f 20 | /* roun|d up to |
|000018a0| 6d 75 6c 74 69 70 6c 65 | 20 6f 66 20 33 32 20 62 |multiple| of 32 b|
|000018b0| 69 74 73 20 2a 2f 0d 09 | 09 66 72 61 6d 65 42 79 |its */..|.frameBy|
|000018c0| 74 65 73 3d 28 73 69 7a | 65 5f 74 29 20 62 69 74 |tes=(siz|e_t) bit|
|000018d0| 73 2d 3e 72 6f 77 42 79 | 74 65 73 20 2a 20 28 62 |s->rowBy|tes * (b|
|000018e0| 69 74 73 2d 3e 62 6f 75 | 6e 64 73 2e 62 6f 74 74 |its->bou|nds.bott|
|000018f0| 6f 6d 2d 62 69 74 73 2d | 3e 62 6f 75 6e 64 73 2e |om-bits-|>bounds.|
|00001900| 74 6f 70 29 3b 0d 09 09 | 62 69 74 73 2d 3e 72 6f |top);...|bits->ro|
|00001910| 77 42 79 74 65 73 20 7c | 3d 20 30 78 38 30 30 30 |wBytes ||= 0x8000|
|00001920| 3b 09 2f 2a 20 6d 61 72 | 6b 20 69 74 20 61 73 20 |;./* mar|k it as |
|00001930| 61 20 50 69 78 4d 61 70 | 20 2a 2f 0d 09 09 62 69 |a PixMap| */...bi|
|00001940| 74 73 2d 3e 62 61 73 65 | 41 64 64 72 3d 28 63 68 |ts->base|Addr=(ch|
|00001950| 61 72 20 2a 29 20 4e 65 | 77 50 74 72 28 66 72 61 |ar *) Ne|wPtr(fra|
|00001960| 6d 65 42 79 74 65 73 29 | 3b 0d 09 09 69 66 28 62 |meBytes)|;...if(b|
|00001970| 69 74 73 2d 3e 62 61 73 | 65 41 64 64 72 20 3d 3d |its->bas|eAddr ==|
|00001980| 20 4e 55 4c 4c 29 72 65 | 74 75 72 6e 20 36 3b 0d | NULL)re|turn 6;.|
|00001990| 09 7d 0d 09 69 66 28 28 | 73 69 7a 65 5f 74 29 62 |.}..if((|size_t)b|
|000019a0| 69 74 73 2d 3e 62 61 73 | 65 41 64 64 72 25 34 20 |its->bas|eAddr%4 |
|000019b0| 21 3d 20 30 4c 29 7b 0d | 09 09 70 72 69 6e 74 66 |!= 0L){.|..printf|
|000019c0| 28 22 57 41 52 4e 49 4e | 47 3a 20 46 72 61 6d 65 |("WARNIN|G: Frame|
|000019d0| 20 62 75 66 66 65 72 20 | 61 64 64 72 65 73 73 20 | buffer |address |
|000019e0| 69 73 20 6e 6f 74 20 6c | 6f 6e 67 20 61 6c 69 67 |is not l|ong alig|
|000019f0| 6e 65 64 2e 20 25 73 5c | 30 30 37 5c 6e 22 2c 5f |ned. %s\|007\n",_|
|00001a00| 5f 46 49 4c 45 5f 5f 29 | 3b 0d 09 7d 0d 0d 09 2f |_FILE__)|;..}.../|
|00001a10| 2a 20 63 72 65 61 74 65 | 20 72 61 6e 64 6f 6d 20 |* create| random |
|00001a20| 6e 6f 69 73 65 20 2a 2f | 0d 09 2f 2a 20 46 69 72 |noise */|../* Fir|
|00001a30| 73 74 20 63 72 65 61 74 | 65 20 61 20 72 61 6e 64 |st creat|e a rand|
|00001a40| 6f 6d 20 62 69 74 20 69 | 6d 61 67 65 2c 20 61 6c |om bit i|mage, al|
|00001a50| 6c 20 62 69 74 73 20 75 | 6e 63 6f 72 72 65 6c 61 |l bits u|ncorrela|
|00001a60| 74 65 64 2e 20 2a 2f 0d | 09 52 61 6e 64 46 69 6c |ted. */.|.RandFil|
|00001a70| 6c 28 62 75 66 66 65 72 | 2e 62 61 73 65 41 64 64 |l(buffer|.baseAdd|
|00001a80| 72 2c 62 75 66 66 65 72 | 42 79 74 65 73 29 3b 0d |r,buffer|Bytes);.|
|00001a90| 09 2f 2a 20 4e 6f 77 20 | 65 78 70 61 6e 64 20 69 |./* Now |expand i|
|00001aa0| 6d 61 67 65 20 73 6f 20 | 74 68 61 74 20 65 61 63 |mage so |that eac|
|00001ab0| 68 20 72 61 6e 64 6f 6d | 20 62 69 74 20 62 65 63 |h random| bit bec|
|00001ac0| 6f 6d 65 73 20 61 20 64 | 78 20 62 79 20 64 79 20 |omes a d|x by dy |
|00001ad0| 72 65 63 74 61 6e 67 6c | 65 2e 20 2a 2f 0d 09 52 |rectangl|e. */..R|
|00001ae0| 47 42 42 61 63 6b 43 6f | 6c 6f 72 28 26 77 68 69 |GBBackCo|lor(&whi|
|00001af0| 74 65 52 47 42 29 3b 0d | 09 52 47 42 46 6f 72 65 |teRGB);.|.RGBFore|
|00001b00| 43 6f 6c 6f 72 28 26 62 | 6c 61 63 6b 52 47 42 29 |Color(&b|lackRGB)|
|00001b10| 3b 0d 09 43 6f 70 79 42 | 69 74 73 28 26 62 75 66 |;..CopyB|its(&buf|
|00001b20| 66 65 72 2c 26 62 69 67 | 42 75 66 66 65 72 2c 26 |fer,&big|Buffer,&|
|00001b30| 62 75 66 66 65 72 2e 62 | 6f 75 6e 64 73 2c 26 62 |buffer.b|ounds,&b|
|00001b40| 69 67 42 75 66 66 65 72 | 2e 62 6f 75 6e 64 73 2c |igBuffer|.bounds,|
|00001b50| 73 72 63 43 6f 70 79 2c | 4e 55 4c 4c 29 3b 0d 09 |srcCopy,|NULL);..|
|00001b60| 65 72 72 6f 72 3d 51 44 | 45 72 72 6f 72 28 29 3b |error=QD|Error();|
|00001b70| 0d 09 69 66 28 65 72 72 | 6f 72 29 70 72 69 6e 74 |..if(err|or)print|
|00001b80| 66 28 22 4d 61 6b 65 4e | 6f 69 73 65 31 3a 61 3a |f("MakeN|oise1:a:|
|00001b90| 20 43 6f 70 79 42 69 74 | 73 20 65 72 72 6f 72 20 | CopyBit|s error |
|00001ba0| 25 64 5c 6e 22 2c 65 72 | 72 6f 72 29 3b 0d 09 2f |%d\n",er|ror);../|
|00001bb0| 2a 20 46 69 6e 61 6c 6c | 79 20 63 6f 70 79 20 69 |* Finall|y copy i|
|00001bc0| 74 20 69 6e 74 6f 20 74 | 68 65 20 62 69 74 2f 70 |t into t|he bit/p|
|00001bd0| 69 78 6d 61 70 2c 20 74 | 72 69 6d 6d 69 6e 67 20 |ixmap, t|rimming |
|00001be0| 69 74 20 64 6f 77 6e 20 | 74 6f 20 74 68 65 20 63 |it down |to the c|
|00001bf0| 6f 72 72 65 63 74 20 73 | 69 7a 65 2e 20 2a 2f 0d |orrect s|ize. */.|
|00001c00| 09 52 47 42 42 61 63 6b | 43 6f 6c 6f 72 28 26 62 |.RGBBack|Color(&b|
|00001c10| 61 63 6b 52 47 42 29 3b | 0d 09 52 47 42 46 6f 72 |ackRGB);|..RGBFor|
|00001c20| 65 43 6f 6c 6f 72 28 26 | 66 6f 72 65 52 47 42 29 |eColor(&|foreRGB)|
|00001c30| 3b 0d 09 73 72 63 52 65 | 63 74 3d 2a 72 3b 0d 09 |;..srcRe|ct=*r;..|
|00001c40| 4f 66 66 73 65 74 52 65 | 63 74 28 26 73 72 63 52 |OffsetRe|ct(&srcR|
|00001c50| 65 63 74 2c 2d 73 72 63 | 52 65 63 74 2e 6c 65 66 |ect,-src|Rect.lef|
|00001c60| 74 2c 2d 73 72 63 52 65 | 63 74 2e 74 6f 70 29 3b |t,-srcRe|ct.top);|
|00001c70| 0d 09 69 66 28 72 61 6e | 64 6f 6d 50 68 61 73 65 |..if(ran|domPhase|
|00001c80| 29 20 4f 66 66 73 65 74 | 52 65 63 74 28 26 73 72 |) Offset|Rect(&sr|
|00001c90| 63 52 65 63 74 2c 6e 72 | 61 6e 64 28 64 78 29 2c |cRect,nr|and(dx),|
|00001ca0| 6e 72 61 6e 64 28 64 79 | 29 29 3b 0d 09 65 6c 73 |nrand(dy|));..els|
|00001cb0| 65 20 43 65 6e 74 65 72 | 52 65 63 74 49 6e 52 65 |e Center|RectInRe|
|00001cc0| 63 74 28 26 73 72 63 52 | 65 63 74 2c 26 62 69 67 |ct(&srcR|ect,&big|
|00001cd0| 42 75 66 66 65 72 2e 62 | 6f 75 6e 64 73 29 3b 0d |Buffer.b|ounds);.|
|00001ce0| 09 43 6f 70 79 42 69 74 | 73 28 26 62 69 67 42 75 |.CopyBit|s(&bigBu|
|00001cf0| 66 66 65 72 2c 28 42 69 | 74 4d 61 70 20 2a 29 62 |ffer,(Bi|tMap *)b|
|00001d00| 69 74 73 2c 26 73 72 63 | 52 65 63 74 2c 72 2c 73 |its,&src|Rect,r,s|
|00001d10| 72 63 43 6f 70 79 2c 4e | 55 4c 4c 29 3b 0d 09 65 |rcCopy,N|ULL);..e|
|00001d20| 72 72 6f 72 3d 51 44 45 | 72 72 6f 72 28 29 3b 0d |rror=QDE|rror();.|
|00001d30| 09 44 69 73 70 6f 73 50 | 74 72 28 28 76 6f 69 64 |.DisposP|tr((void|
|00001d40| 20 2a 29 20 62 75 66 66 | 65 72 2e 62 61 73 65 41 | *) buff|er.baseA|
|00001d50| 64 64 72 29 3b 0d 09 44 | 69 73 70 6f 73 50 74 72 |ddr);..D|isposPtr|
|00001d60| 28 28 76 6f 69 64 20 2a | 29 20 62 69 67 42 75 66 |((void *|) bigBuf|
|00001d70| 66 65 72 2e 62 61 73 65 | 41 64 64 72 29 3b 0d 09 |fer.base|Addr);..|
|00001d80| 72 65 74 75 72 6e 20 65 | 72 72 6f 72 3b 0d 7d 0d |return e|rror;.}.|
|00001d90| 0d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 00 00 01 00 00 00 02 da | 00 00 01 da 00 00 00 66 |........|.......f|
|00001e10| 00 00 13 2d 0b 54 69 6d | 65 43 50 55 2e 66 61 74 |...-.Tim|eCPU.fat|
|00001e20| 02 00 02 00 41 50 50 4c | 3f 3f 3f 3f 01 00 00 dc |....APPL|????....|
|00001e30| 0b 4e 6f 69 73 65 46 69 | 6c 6c 2e 63 02 00 00 00 |.NoiseFi|ll.c....|
|00001e40| 50 61 72 74 53 49 54 21 | 00 00 00 00 00 00 00 00 |PartSIT!|........|
|00001e50| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e70| 00 00 ab bf ee 67 00 00 | 00 00 00 00 03 40 00 00 |.....g..|.....@..|
|00001e80| 00 00 00 00 00 00 13 00 | 00 00 13 2d 0d 54 69 6d |........|...-.Tim|
|00001e90| 65 43 50 55 2e 70 70 63 | 2e b5 02 00 02 00 4d 4d |eCPU.ppc|......MM|
|00001ea0| 50 52 4d 50 43 43 01 00 | 00 f0 01 20 00 00 00 00 |PRMPCC..|... ....|
|00001eb0| 13 73 00 00 00 00 12 0c | 00 00 16 00 00 00 00 00 |.s......|........|
|00001ec0| 05 2e 00 00 16 00 aa 6d | cc 00 aa f0 96 67 00 00 |.......m|.....g..|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 28 02 00 01 | 00 00 00 00 00 00 00 00 |....(...|........|
|00001ef0| 28 03 00 01 00 00 00 00 | 00 00 00 00 00 00 00 00 |(.......|........|
|00001f00| 00 00 00 0a 00 00 10 05 | ff ff 00 00 00 00 00 00 |........|........|
|00001f10| 01 50 00 0b 00 2c 00 00 | 12 78 00 67 00 cb 54 60 |.P...,..|.x.g..T`|
|00001f20| 80 00 00 29 03 c9 00 90 | 04 6f 94 20 00 00 00 00 |...)....|.o. ....|
|00001f30| 00 00 0d 62 75 66 66 65 | 72 2e 62 6f 75 6e 64 73 |...buffe|r.bounds|
|00001f40| 00 1e 00 00 13 ad 00 6e | 00 cb 53 e8 00 00 0f 62 |.......n|..S....b|
|00001f50| 75 66 66 65 72 2e 72 6f | 77 42 79 74 65 73 00 1a |uffer.ro|wBytes..|
|00001f60| 00 00 13 fe 00 6f 00 cb | 53 d8 00 00 0b 62 75 66 |.....o..|S....buf|
|00001f70| 66 65 72 42 79 74 65 73 | 00 30 00 00 14 f8 00 75 |ferBytes|.0.....u|
|00001f80| 00 cb 53 c8 80 00 00 80 | 03 c2 00 e7 04 64 94 20 |..S.....|.....d. |
|00001f90| 00 00 00 00 00 00 11 62 | 69 67 42 75 66 66 65 72 |.......b|igBuffer|
|00001fa0| 2e 62 6f 75 6e 64 73 20 | 00 22 00 00 15 6c 00 77 |.bounds |."...l.w|
|00001fb0| 00 cb 53 5c 00 00 13 62 | 69 67 42 75 66 66 65 72 |..S\...b|igBuffer|
|00001fc0| 2e 72 6f 77 42 79 74 65 | 73 20 00 16 00 00 17 41 |.rowByte|s .....A|
|00001fd0| 00 81 00 cb 53 4c 00 00 | 07 2a 66 72 61 6d 65 20 |....SL..|.*frame |
|00001fe0| 00 14 00 00 17 41 00 81 | 00 cb 52 a8 00 00 05 66 |.....A..|..R....f|
|00001ff0| 72 61 6d 65 00 1a 00 00 | 17 41 00 81 00 cb 52 98 |rame....|.A....R.|
|00002000| 00 00 0b 66 72 61 6d 65 | 2d 3e 68 52 65 73 00 1a |...frame|->hRes..|
|00002010| 00 00 18 b0 00 87 00 cb | 52 88 00 00 0b 66 72 61 |........|R....fra|
|00002020| 6d 65 42 79 74 65 73 20 | 00 26 00 00 17 25 00 80 |meBytes |.&...%..|
|00002030| 00 cb 51 3c 80 00 00 ca | 03 c9 01 9f 04 b7 94 20 |..Q<....|....... |
|00002040| 00 00 00 00 00 00 07 2a | 66 72 61 6d 65 20 00 14 |.......*|frame ..|
|00002050| 00 00 17 25 00 80 00 cb | 50 cc 00 00 05 66 72 61 |...%....|P....fra|
|00002060| 6d 65 00 00 00 28 00 02 | 00 00 0f 19 00 00 0f 19 |me...(..|........|
|00002070| 09 4d 61 6b 65 4e 6f 69 | 73 65 00 00 10 f5 00 00 |.MakeNoi|se......|
|00002080| 10 ff 0b 4d 61 6b 65 4e | 6f 69 73 65 31 00 00 00 |...MakeN|oise1...|
|00002090| 00 48 00 09 4d 6f 6e 61 | 63 6f 00 00 00 00 00 00 |.H..Mona|co......|
|000020a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020b0| 00 00 00 00 00 03 00 04 | 00 3c 00 03 01 8c 02 7d |........|.<.....}|
|000020c0| 00 3c 00 03 01 8c 02 7d | aa f7 62 47 00 00 10 cd |.<.....}|..bG....|
|000020d0| 00 00 10 cd 00 00 10 38 | 00 00 00 00 01 00 00 00 |.......8|........|
|000020e0| 02 da 00 00 01 da 00 00 | 00 66 00 9e 7f b8 23 fe |........|.f....#.|
|000020f0| 00 00 00 1c 00 66 00 02 | 4d 50 53 52 00 01 00 1a |.....f..|MPSR....|
|00002100| 42 4b 50 54 00 00 00 32 | 44 54 56 55 00 00 00 3e |BKPT...2|DTVU...>|
|00002110| 03 ef ff ff 00 00 01 62 | 00 00 00 00 03 ed ff ff |.......b|........|
|00002120| 00 00 01 8e 00 00 00 00 | 3c 9c ff ff 00 00 00 00 |........|<.......|
|00002130| 00 00 00 00 3f 7c ff ff | 00 00 00 0e 00 00 00 00 |....?|..|........|
|00002140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+